<!-- #layout name=blank-->
<div class="page-header">
    <h1 class="title" data-bind="text: Kooboo.text.common.Contents + ': ' + folderName()"></h1>

    <div>
        <div class="input-group input-large pull-right">
            <input type="text" data-bind="value: searchKey, event: { keyup: handleEnter }" class="form-control" style="height: 32px;" placeholder="输入关键字">
            <div class="input-group-btn">
                <button class="btn btn-default" data-bind="click: searchStart"><i class="fa fa-search"></i>Search</button>
            </div>
        </div>
    </div>
</div>
<div data-bind="component: { name: 'kb-breadcrumb', params: [{
    name: 'SITES'
}, {
    name: 'DASHBOARD'
}, {
    name: Kooboo.text.common.contentFolders,
    url: Kooboo.Route.Get(Kooboo.Route.TextContent.ListPage)
}, {
    name: folderName()
}] }"></div>
<div class="navbar navbar-default">
    <div class="container-fluid">
        <a class="btn btn-link disabled navbar-btn" data-bind="visible: isSearching" href="javascript:;">Search result</a>
        <a data-bind="attr:{'href':newTextContent}, text: Kooboo.text.site.textContent.new + ' ' + folderName(), visible: !isSearching()" class="btn green navbar-btn"></a>
        <a data-bind="visible: showDeleteBtn, click: onDelete" class="btn red navbar-btn">Delete</a>
        <a data-bind="click: onEditContentType, tooltip: Kooboo.text.site.contentType.editContentType, tooltipPlacement: 'left', visible: !isSearching()" href="javascript:;" class="btn btn-default navbar-btn pull-right"><i class="fa fa-gear"></i></a>
        <a href="javascript:;" class="btn btn-default navbar-btn pull-right" data-bind="visible: isSearching, click: clearSearching"><i class="fa fa-close"></i></a>
    </div>
</div>
<div data-bind="component: { name: 'kb-table', params: tableData }"></div>
<div data-bind="component: { name: 'kb-pager', params: pager }"></div>

<script>
    (function() {
        Kooboo.loadJS([
            "/_Admin/Scripts/components/kbTable.js",
            "/_Admin/Scripts/components/kbBreadcrumb.js",
            "/_Admin/Scripts/tableModel.js",
            "/_Admin/Scripts/components/kbPager.js",
        ])
    })()
</script>
<script src="/_Admin/View/Contents/TextContentsByFolder.js"></script>